From: Ewan Mellor Date: Wed, 27 Dec 2006 00:38:01 +0000 (+0000) Subject: Fix HVM booting through Xen-API when the kernel is unspecified. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~150 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=866cc9cd435470ec198b34c48d09e31118205aab;p=xen.git Fix HVM booting through Xen-API when the kernel is unspecified. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 6bd11899b6..e66bf89915 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1555,6 +1555,8 @@ class XendDomainInfo: if boot: # HVM booting. self.info['image']['type'] = 'hvm' + if not 'devices' in self.info['image']: + self.info['image']['devices'] = {} self.info['image']['devices']['boot'] = boot elif not blexec and kernel: # Boot from dom0. Nothing left to do -- the kernel and ramdisk diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index d3876e2749..d4c475c371 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -312,6 +312,9 @@ class HVMImageHandler(ImageHandler): def configure(self, vmConfig, imageConfig, deviceConfig): ImageHandler.configure(self, vmConfig, imageConfig, deviceConfig) + if not self.kernel: + self.kernel = '/usr/lib/xen/boot/hvmloader' + info = xc.xeninfo() if 'hvm' not in info['xen_caps']: raise VmError("HVM guest support is unavailable: is VT/AMD-V "